from blocking_resource import BlockingResource
import online_user
from response import RedirectResponse

class LoginResource(BlockingResource):
    onlineUserList = online_user.OnlineUserList()

    def _render_POST(self, request):
        userName = request.args['username'][0]
        #id = self.onlineUserList.genId()
        #newUser = online_user.OnlineUser(id, userName)
        #self.onlineUserList.add(id, newUser)

        return RedirectResponse('./sgs/pages/test_ui.html?uname=%s'%(userName))
